﻿<Window x:Class="MathBlockDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:oxy="clr-namespace:OxyPlot.Wpf"
        Title="MathBlock demo" Height="480" Width="720">
    <GroupBox Header="MathBlock" Margin="8" Padding="8">
        <StackPanel>
            <oxy:MathBlock FontSize="40" Foreground="DarkRed" Background="Lavender" FontStyle="Italic" FontWeight="ExtraBold" HorizontalAlignment="Left" Padding="40 0 0 0" ToolTip="HorizontalAlignment=Left">E=mc^{2}</oxy:MathBlock>
            <oxy:MathBlock FontSize="64" FontFamily="Times New Roman" Background="LemonChiffon" HorizontalAlignment="Right" ToolTip="HorizontalAlignment=Right">x^{2}_{i}</oxy:MathBlock>
            <oxy:MathBlock FontSize="36" FontWeight="Bold" Background="LightGreen" HorizontalAlignment="Center" ToolTip="HorizontalAlignment=Center">H_{2}O</oxy:MathBlock>
            <oxy:MathBlock FontSize="12" Background="CornflowerBlue" ToolTip="Default HorizontalAlignment (Stretch)">ABC</oxy:MathBlock>
            <oxy:MathBlock HorizontalContentAlignment="Center" Background="LightYellow" ToolTip="HorizontalContentAlignment=Center, HorizontalAlignment=Stretch">x_{0}^{2n}</oxy:MathBlock>
            <WrapPanel Orientation="Horizontal">
                <TextBlock Text="The contents of MathBlock and TextBlock should be aligned: "/>
                <oxy:MathBlock Content="x^{2}_{i}"/>
                <TextBlock Text=", "/>
                <oxy:MathBlock Content="H_{2}O"/>
                <TextBlock Text=", "/>
                <oxy:MathBlock Content="5^{th}"/>
                <TextBlock Text="."/>
            </WrapPanel>
        </StackPanel>
    </GroupBox>
</Window>
